/*
 *          		  MidiMaker 
 *       		   (Working title)
 *  		Joe Mirizio & Earl Bellinger
 * 
 *	GNU General Public License version 3.0 (GPLv3)
 */
package midimaker;

import javax.sound.midi.Track;

public class Bass extends InstrumentTrack {

    public Bass(Track track, int channel) {
        super(track, channel);
        setOctave(4);
        changeProgram(35, 0);
    }

    public Bass(Track track, int channel, int program) {
        this(track, channel);
        changeProgram(program, 0);
    }

    /*public int[][] generateNotes(int[] harmony) {
    int[][] a = new int[harmony.length][];
    for (int i = 0; i < a.length; i++)
    a[i] = new int[]{harmony[i], i * 4, 4};
    return a;
    }*/
    public int[][] generateNotes(int[] harmony) {
        int[][] a = new int[4 * harmony.length][];
        int counter = 0;
        for (int i = 0; i < a.length - 3; i = i + 4) {
            for (int j = 0; j < 4; j++)
                a[i + j] = new int[]{harmony[counter], i + j};
            counter++;
        }
        return a;
    }
}
